﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="currentSupplyPrice.aspx.cs"
    Inherits="PeisongWeb.admin.currentSupplyPrice" %>

<%@ Register TagName="top" Src="controls/top.ascx" TagPrefix="uc1" %>
<%@ Register TagName="menu" Src="controls/menu.ascx" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>商品当前供应价格列表 - 想购网长期采购物流配送系统</title>
    <!--#include file="style.inc"-->

    <script type="text/javascript">
        function resetSrh() {
            document.getElementById("drp_CategoryRoot").value = "";
            document.getElementById("drp_CategorySub").value = "";
            document.getElementById("txtProductName").value = "";
            document.getElementById("ddl_BusinessNature").value = "";
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sm1" runat="server">
    </asp:ScriptManager>
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    <uc1:top ID="Top1" runat="server" />
    <uc2:menu ID="Menu1" runat="server" />
    <div id="admin-body">
        <h2 class="section-cms">
            商品当前供应价格列表 (<%=DateTime.Now.ToShortDateString() %>)
        </h2>
        <p>
            <span style="<%=power>=2?"": "display:none" %>">
                【包含供应价
                <input style="margin-bottom:-3px" runat="server" type="checkbox" id="cbo_hasSellerPrice" name="check" />
                
                    包含系统价
                <input style="margin-bottom:-3px" runat="server" type="checkbox" id="cbo_hasPrice" name="check" />】
                [<asp:LinkButton ID="lbtn_ToExecl" runat="server" Text="导出当前列表商品供应价格EXCEL" OnClick="lbtn_ToExecl_Click">
                </asp:LinkButton>] &nbsp;&nbsp;&nbsp; [<asp:LinkButton ID="lbtn_ToExeclAll" runat="server"
                    Text="导出全部商品供应价格EXCEL" OnClick="lbtn_ToExeclAll_Click">
                </asp:LinkButton>] </span>
        </p>
        <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Always">
            <ContentTemplate>
                <ext:Panel ID="Panel1" runat="server" Title="商品当前供应价格搜索" BodyStyle="padding:5px 5px 0"
                    Width="1120" Frame="true" ButtonAlign="Center">
                    <Body>
                        <div id="admin_edit_content_search">
                            <ul>
                                <li style="width: 185px; margin-right: 5px;">
                                    <label>
                                        大 类
                                    </label>
                                    <asp:DropDownList runat="server" ID="drp_CategoryRoot" DataTextField="name" DataValueField="categoryId"
                                        AutoPostBack="True" OnSelectedIndexChanged="ddl_CategoryRoot_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </li>
                                <li style="width: 175px; margin-right: 5px;">
                                    <label>
                                        小 类
                                    </label>
                                    <asp:DropDownList runat="server" ID="drp_CategorySub" DataTextField="name" DataValueField="categoryId"
                                        AutoPostBack="True" OnSelectedIndexChanged="ddl_CategorySub_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </li>
                                <li style="width: 155px; margin-right: 5px;">
                                    <label>
                                        等级</label>
                                    <asp:DropDownList runat="server" ID="ddl_BusinessNature" DataTextField="name" DataValueField="xm"
                                        AutoPostBack="True" OnSelectedIndexChanged="ddl_BusinessNature_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </li>
                                <li style="width: 185px; margin-right: 5px;">
                                    <label>
                                        商品名称
                                    </label>
                                    <asp:TextBox runat="server" Width="105px" ID="txtProductName"></asp:TextBox>
                                </li>
                                <li>
                                    <label>
                                        &nbsp;</label>
                                    [<asp:LinkButton runat="server" ID="link_Search" OnClick="link_Search_Click">搜索</asp:LinkButton>]&nbsp;&nbsp;
                                    [<a href="javascript:void(0);" onclick="resetSrh();">重置</a>] </li>
                            </ul>
                        </div>
                    </Body>
                </ext:Panel>
                <p>
                    &nbsp;</p>
                <div id="admin_list_content" style="width: 1120px;">
                    <table cellpadding="0" cellspacing="0">
                        <tr class="header-row">
                            <th>
                                商品编号
                            </th>
                            <th>
                                等级
                            </th>
                            <th>
                                商品名称
                            </th>
                            <th>
                                规格
                            </th>
                            <th>
                                供应商名称
                            </th>
                            <th>
                                供应价格
                            </th>
                            <th>
                                查看历史价格
                            </th>
                        </tr>
                        <asp:Repeater ID="rpt_list" runat="server">
                            <ItemTemplate>
                                <tr class='<%# Container.ItemIndex%2==0? "row-alt":"alt"  %>'>
                                    <td>
                                        <%# Eval("productNo")%>
                                    </td>
                                    <td>
                                        <%#DataBinder.Eval(Container.DataItem,"businessNatureName") %>
                                    </td>
                                    <td>
                                        <%#Eval("productName")%>
                                    </td>
                                    <td>
                                        <%#Eval("standard")%>
                                    </td>
                                    <td>
                                        <a target="_blank" href='priceHistoryList.aspx?no=<%#Eval("productNo")%>&bn=<%#DataBinder.Eval(Container.DataItem,"businessNature") %>&target=company&company=<%# HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"company").ToString()) %>'>
                                            <%#Eval("company")%></a>
                                    </td>
                                    <td>
                                        <%# String.Format("{0:F2}元", Eval("sellerPrice")).ToString()%>/<%#Eval("unit")%>
                                    </td>
                                    <td>
                                        <a href="priceHistoryList.aspx?no=<%#Eval("productNo")%>&bn=<%#DataBinder.Eval(Container.DataItem,"businessNature") %>&target=sellerPrice"
                                            target="_blank">查看历史价格</a>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                    <div id="page">
                        <webdiyer:AspNetPager ID="AspNetPager1" NumericButtonType="Text" MoreButtonType="Text"
                            OnPageChanged="AspNetPager1_PageChanged" runat="server" AlwaysShow="True" PageSize="20"
                            InvalidPageIndexErrorMessage="无效页码" PageIndexOutOfRangeErrorMessage="页码超出范围"
                            ShowCustomInfoSection="Left" CustomInfoHTML=" 每页%PageSize%条记录 | 总共%RecordCount%条记录 "
                            CustomInfoTextAlign="Left" HorizontalAlign="Right" NextPageText="下一页" FirstPageText="首页"
                            LastPageText="末页" PrevPageText="上一页">
                        </webdiyer:AspNetPager>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
